package com.ny.zmb.openapi.ysutil.from.merchant;

import com.ny.zmb.openapi.ysutil.annotation.Length;
import com.ny.zmb.openapi.ysutil.annotation.NotBlank;
import com.ny.zmb.openapi.ysutil.utils.RequestNoUntil;
import com.ny.zmb.openapi.ysutil.utils.StringUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 商户提现卡查询
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MerchantBankAccountQuery {
    /**
     * String	M	业务请求号
     */

    @NotBlank(message = "业务请求号" + "不能为空")
    @Length(max = 32, message = "业务请求号" + "长度超过" + "32" + "个字符")
    private String requestNo;
    /**
     * String	M	银盛商户号
     */
    private String merchantNo;
    public void setRequestNo(String requestNo) {
        if (StringUtils.isEmpty(requestNo)) {
            this.requestNo = RequestNoUntil.generateNumericTaskNumber();
        } else {
            this.requestNo = requestNo;
        }
    }
    public void checkRequestNo(){
        if (StringUtils.isEmpty(requestNo)) {
            this.requestNo = RequestNoUntil.generateNumericTaskNumber();
        }
    }
}
